import React, { Component } from "react";

import { Link, Route, NavLink, Switch, Redirect } from "react-router-dom";

import About from "./pages/About";
import Home from "./pages/Home";

export default class App extends Component {
    render() {
    return (
      <div>
        
        <hr />
        
        <NavLink to="/home">home...跳转</NavLink>
        &nbsp;
        &nbsp;
        <NavLink to="/about">about...跳转</NavLink>
        <Switch>
            <Route path="/about" component={About} /> 
            <Route path="/home" render={() => {
                return <Home a={ 1 }/>
            }} />
            <Redirect to="/home"/>
        </Switch>
           
         
      </div>
    );
  }
}